﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/CmsSystem/MasterPage/AdminForm.Master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="/Scripts/kindeditor/kindeditor-min.js" type="text/javascript"></script>
    <script src="/Scripts/kindeditor/lang/zh_CN.js" type="text/javascript"></script>
    <script src="/Scripts/easyui/easyloader.js" type="text/javascript"></script>
    <script type="text/javascript">
        FormID = "Info";
        var keditor;
        function loadKindEditor() {
            keditor = KindEditor.create('[name=CONTENT]', {
                themeType: 'qq',
                items: [
						'bold', 'italic', 'underline', 'fontname', 'fontsize', 'forecolor', 'hilitecolor', 'plug-align', 'plug-order', 'plug-indent', 'link'
					]
            });
        }
        FormLoadCallBack = function () {
            loadKindEditor();
        }
        FormSubmitCallback = function () {
            if (keditor)
                keditor.sync();
            return true;
        }
        $(function () {
            var w = GetInnerWidth() - 10;
            var h = GetInnerHeight() - 50;
            var leftwidth = w - 200 - 10;
            $("#left").css("width", leftwidth + "px");
            $("[name=CONTENT]").css("height", h + "px").css("width", leftwidth - 10 + "px");
            $("#btnTitle").css("width", leftwidth - 12 + "px");
            $("#btnSave").click(function () {
                Save(function () {
                    ShowMessage("提醒", "保存成功!");
                });
            });
            $("#btnSaveRedirect").click(function () {
                Save(function () {
                    ShowMessage("提醒", "保存成功!");
                    location.href = "List.aspx";
                });
            });
            $("#btnRedirect").click(function () {
                location.href = "List.aspx";
            });
            $("#btnPreview").click(function () {
                var url = "Preview.aspx?id=" + ID;
                window.open(url);
            });
            using("linkbutton", function () {
                $("a").addClass("easyui-linkbutton").click(function () {
                    return false;
                }).linkbutton();
            });
        })
        function ShowMessage(title, content) {
            using("messager", function () {
                $.messager.show({
                    title: title,
                    msg: content,
                    timeout:2000,
                    showType: 'show'
                });
            });
        }
    </script>
    <style type="text/css">
        #left
        {
            border-right: 2px dotted #aaa;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="left" style="width: 400px; float: left;">
        <div class="row">
            <label class="input XI">
                <input type="text" id="btnTitle" name="TITLE" />
            </label>
        </div>
        <div>
            <textarea name="CONTENT"></textarea>
        </div>
    </div>
    <div id="right" style="width: 195px; float: right;">
        <div>
            <a id="btnSave">保存</a> 
            <a id="btnSaveRedirect">保存并返回列表</a> 
            <a id="btnPreview">预览</a>
            <a id="btnRedirect">返回列表</a> 
        </div>
        <div>
            关键词
        </div>
        <div>
            <input type="text" name="KEYWORD" />
        </div>
        <div>
            摘要
        </div>
        <div>
            <textarea name="SUMMARY"></textarea>
        </div>
        <div>
            发表人
            <label name="CREATERUSER">
            </label>
        </div>
        <div>
            发表日期
            <label name="CREATEDATE">
            </label>
        </div>
        <div>
            发布<input type="checkbox" name="PUBLISHED" />
        </div>
    </div>
</asp:Content>
